<?php
include 'Assertion.php';

$assertion = new BadgeAssertion();
echo "Impostato UID<br>";
$assertion->setUID("1");
echo "Impostato Recipient<br>";
$assertion->setRecipient("earner");
if ($assertion->checkValidity())
echo "Valido<br>";
else
echo "Non valido<br>";
echo "Impostato Badge<br>";
$assertion->setBadge("badge");
echo "Impostato Validity<br>";
$assertion->setVerify("validity");
echo "Impostato IssuedOn<br>";
$assertion->setIssuedOn();
if ($assertion->checkValidity())
echo "Valido<br>";
else
echo "Non valido<br>";
echo var_dump($assertion->getArray()) . "<br>";
echo "Impostato Evidence<br>";
$assertion->setEvidence("evidence");
if ($assertion->checkValidity())
echo "Valido<br>";
else
echo "Non valido<br>";
echo var_dump($assertion->getArray()) . "<br>";
echo "<br>JSON<br>";
echo json_encode($assertion->getArray());
?>